local skel = fk.CreateSkill {
  name = "lb__fayan",
  --tags = {Skill.Compulsory},
}

Fk:loadTranslationTable {
  ["lb__fayan"] = "伐焱",
  --[":lb__fayan"] = "<b>锁定技</b>，准备阶段，你将一张牌当【南蛮入侵】使用。其他角色因此受到伤害时，若你的体力值大于1，则强制发动<a href=':lb__zhuhuo'><font color='red'>〖逐火〗</font></a>，然后将此伤害改为火焰伤害。",

  --9.2
  --[":lb__fayan"] = "准备阶段，你可以将一张非基本牌当【南蛮入侵】使用。其他角色因此受到伤害时，若你的体力值大于上限的一半（向下取整），则强制发动<a href=':lb__zhuhuo'><font color='red'>〖逐火〗</font></a>，然后将此伤害改为火焰伤害。",
  --9.9
  --[":lb__fayan"] = "出牌阶段，你可以将一张非基本牌当【南蛮入侵】使用。其他角色因此受到伤害时，若你的体力值大于上限的一半（向下取整），则强制发动<a href=':lb__zhuhuo'><font color='red'>〖逐火〗</font></a>，然后将此伤害改为火焰伤害。",
  --9.16
  [":lb__fayan"] = "准备阶段，你可以视为使用一张【南蛮入侵】。其他角色因此受到伤害时，若你的体力值大于上限的一半（向下取整），则强制发动<a href=':lb__zhuhuo'><font color='red'>〖逐火〗</font></a>，然后将此伤害改为火焰伤害。",

  --["#lb__fayan"] = "伐焱：请将一张牌当【南蛮入侵】使用",
  --["#lb__fayan"] = "伐焱：你可以将一张非基本牌当【南蛮入侵】使用", --9.2
  ["#lb__fayan"] = "伐焱：你可以视为使用【南蛮入侵】", --9.16

  ["$lb__fayan1"] = "看看吧，最后谁会留下。",
  ["$lb__fayan2"] = "垂死之魂，直面我！",
}
--[[
--9.9
skel:addEffect("viewas", {
  anim_type = "offensive",
  pattern = "savage_assault",
  prompt = "#lb__fayan",
  card_filter = function(self, player, to_select, selected, selected_targets)
    return #selected == 0 and Fk:getCardById(to_select).type ~= Card.TypeBasic
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return nil end
    local card = Fk:cloneCard("savage_assault")
    card.skillName = skel.name
    card:addSubcards(cards)
    return card
  end,
  enabled_at_play = function(self, player)
    return not (player:isNude() and #player:getHandlyIds() == 0) and player.phase == Player.Play
  end,
  enabled_at_response = function(self, player, response)
    return not response and not (player:isNude() and #player:getHandlyIds() == 0) and player.phase == Player.Play
  end,
})
--]]
---[[
skel:addEffect(fk.EventPhaseStart, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and data.phase == Player.Start
    and player:canUse(Fk:cloneCard("savage_assault")) --and not (player:isNude() and #player:getHandlyIds() == 0)
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    local use = room:askToUseVirtualCard(player, {
      name = "savage_assault",
      skill_name = skel.name,
      prompt = "#lb__fayan",
      --cancelable = false,
      cancelable = true,--9.2
      --[[
      card_filter = {
        n = 1,
        pattern = ".|.|.|.|.|^basic",--9.2
      },
      --]]
      skip = true,
    })
    if use then
      event:setCostData(self, {use = use})
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local use = event:getCostData(self).use
    player.room:useCard(use)
  end,
})
--]]
return skel
